package com.gitee.swsk33.mainmodule.config;

import com.gitee.swsk33.functionone.FunctionOneApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 用于导入其它模块的配置，使得其它模块中的Bean也能够交给IoC托管
 * 还可以借助Spring的条件注解例如@ConditionalOnProperty，实现通过配置或者其它条件动态控制这个配置类是否加载，进而实现控制@Import是否生效
 */
@Configuration
@Import(FunctionOneApplication.class)
@ConditionalOnProperty(prefix = "com.gitee.swsk33.function-one", name = "enabled")
public class FunctionImportConfig {
}